package com.woniuxy.controller;

import com.woniuxy.entity.RbacManager;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

@Controller
public class MyThymeleafController {
    @RequestMapping("/myHtml")
    public String myHtml(Model model){
        List list = new ArrayList();
        for (int i = 0; i < 10; i++) {
            RbacManager rbacManager = new RbacManager();
            rbacManager.setAccount("admin"+i);
            rbacManager.setPassword("1234556"+i);
            list.add(rbacManager);
        }
        model.addAttribute("managers",list);
        return "myHtml";
    }
}

